The electrical power rating of a storage battery is defined in terms of the electrical current that can be discharged from the battery into a load over time at the rated voltage. Typically, a battery is employed to energize a device when a line electrical power source is either unavailable or the cost/space limitations of the device make the use of a line source undesirable. Since the amount of electrical power that can be stored by a storage battery is finite, it is highly desirable to provide means for accurately measuring the power discharged from a battery supplying electrical current to a device.
One of the simplest circuits for measuring current supplied by a battery to a load employs a low resistance "sense" resistor connected in series between the load and a terminal of the battery. The voltage across the sense resistor is indicative of the current flowing to the load from the storage battery. The circuit measures the magnitude of this voltage and provides a corresponding load current indication. However, this simple circuit does not measure the total amount of current from the battery over a period of time. Instead, only the instantaneous flow of current through the load is determined. Additional circuitry must be provided to determine the total power discharged from the battery. A digital processor is particularly well suited to the task of determining the total electrical power discharged from the battery and determining the remaining power stored therein. Since instantaneous current measurements are indicated by an analog signal, an analog-to-digital (A/D) conversion is required to enable a digital processor to use the signal indicative of current. An A/D converter can be used to transform the analog signal into a digital value, which is scaled to the number of digital bits provided by the A/D converter, e.g., an 8-bit A/D converter provides a digital value scaled from 0 to 255.
Another device that can be employed to perform A/D conversion is a comparator, which produces a digital bit when an analog signal at one input is equal to or greater than a reference signal at another input. Typically, the reference signal has a ramp waveform with a time period that is predetermined by the digital processor, so that the comparator produces a digital bit at the "cross over" point, e.g., when the value of the ramping reference signal is equal to or greater than the analog signal. The processor employs the time period of the "cross over" point and the time period of the ramp to determine an approximation of the total amount of current that was discharged from the battery. Since the comparator can only produce a single bit at the cross over point, the approximation is only accurate if the ramp waveform time period is at least twice as fast as the changes occurring in the measured signal. Thus, if the signal being measured is a discontinuous analog signal that switches on and off twice as fast as the ramp's time period, then the processor will fail to detect the current signal to be measured.
Until recently, devices having discontinuous current draw occurring during time intervals significantly shorter than the sampling period of a digital processor were relatively unknown. However, a substantial increase in the use of devices such as stepper motors, which intermittently draw current for time periods that are significantly shorter than the sampling rate of most digital processors, has made it difficult to accurately measure short-term discontinuous load currents. Stepper motors are often employed in battery powered consumer electronic devices, such as video camcorders and portable compact disc (CD) players. Also, the medical industry employs stepper motors to drive medical pumps that deliver specific quantities of medical substances to patients. Accordingly, it will be apparent that there is a need for a low cost approach for monitoring the current supplied to such devices over time to determine the charge remaining on storage batteries used to energize the devices.